<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>单表管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			$("#btnImport").click(function(){
				$("leagueMacthes").attr()
				$.jBox($("#importBox").html(), {title:"导入数据", buttons:{"关闭":true}, 
					bottomText:""});
			});
			*/
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		function strength(id,name) {
			$("#macthesId").attr("value",id)
			$("#macthesName").attr("value",name)
			$.jBox($("#importBox").html(), {title:"联赛排名", buttons:{"关闭":true}, 
				bottomText:""});
		}
	</script>
</head>
<body>
	<div id="importBox" class="hide">
		<form id="importForm" action="${ctx}/qx/qxLeagueMatches/strength" method="post" class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入，请稍等...');"><br/>
			<input id="macthesId" name="leagueid" type="hidden" style="width:100px"/>
			联赛：<input id="macthesName" name="name" type="text" style="width:100px"/></br></br>
			强队：<input  name="limitStart" type="text" style="width:100px"/></br></br>
			弱队：<input  name="limitEnd" type="text" style="width:100px"/></br></br>
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="设置"/>
		</form>
	</div>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/qx/qxLeagueMatches/">单表列表</a></li>
		<shiro:hasPermission name="qx:qxLeagueMatches:edit"><li><a href="${ctx}/qx/qxLeagueMatches/form">单表添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="qxLeagueMatches" action="${ctx}/qx/qxLeagueMatches/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>名称：</label>
				<form:input path="name" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>id</th>
				<th>名称</th>
				<th>简称</th>
				<th>create_date</th>
				<shiro:hasPermission name="qx:qxLeagueMatches:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="qxLeagueMatches">
			<tr>
				<td><a href="${ctx}/qx/qxLeagueMatches/form?id=${qxLeagueMatches.id}">
					${qxLeagueMatches.id}
				</a></td>
				<td>
					${qxLeagueMatches.name}
					${fns:getQxLeagueMatches(qxLeagueMatches.id).name}
				</td>
				<td>
					${qxLeagueMatches.abbreviation}
				</td>
				<td>
					<fmt:formatDate value="${qxLeagueMatches.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<shiro:hasPermission name="qx:qxLeagueMatches:edit"><td>
					<a  id="btnImport" onclick="javascript:strength('${qxLeagueMatches.id}','${qxLeagueMatches.name}')" >联赛排名</a>
    				<a href="${ctx}/qx/qxLeagueMatches/form?id=${qxLeagueMatches.id}">修改</a>
					<a href="${ctx}/qx/qxLeagueMatches/delete?id=${qxLeagueMatches.id}" onclick="return confirmx('确认要删除该单表吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>